<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="author" content="甘忠祥">
    <title>提示框效果</title>
    <style>
       .container{
            width: 850px;
            height: 500px;
            border: 1px solid gainsboro;
            display: flex;
            flex-wrap: wrap;
            margin: 150px auto;
       }
       .container div{
             position: relative; 
             width: 200px;
             height: 200px;
             background-color: gray;
             margin: 5px 5px;
             text-align: center;
       }

       img{
            width: 200px;
            height: 200px;
            position: absolute; 
            left:0; 
            top: 0;
            opacity: 0;
       }
       h1{
            margin: 0 auto;
            width: 1000px; 
            text-align: center;
            margin-bottom: 10px; 
       }
       .container div img:hover{
           z-index: 100;
           opacity: 1;
           transition: all 0.5s linear;
       }
    </style>
</head>
<body>
    <div class="container">
         <h1>美女展示</h1> 
        <div>1号
            <img src="./img/2.jpg" alt="">
        </div>
        <div>2号
            <img src="./img/3.jpg" alt="">
        </div>
        <div>3号
            <img src="./img/4.jpg" alt="">
        </div>
        <div>4号
            <img src="./img/5.jpg" alt="">
        </div>
        <div>5号
            <img src="./img/6.jpg" alt="">
        </div>
        <div>6号
            <img src="./img/7.jpg" alt="">
        </div>
        <div>7号
            <img src="./img/8.jpg" alt="">
        </div>
        <div>8号
            <img src="./img/9.jpg" alt="">
        </div>
    </div>
</body>

</html>